/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author wyr
 */
@Entity
@Table(name = "t_spcode")
//@NamedQueries({@NamedQuery(name = "TSpcode.findAll", query = "SELECT t FROM TSpcode t"), @NamedQuery(name = "TSpcode.findBySpcode", query = "SELECT t FROM TSpcode t WHERE t.spcode = :spcode"), @NamedQuery(name = "TSpcode.findBySpname", query = "SELECT t FROM TSpcode t WHERE t.spname = :spname"), @NamedQuery(name = "TSpcode.findBySpaddress", query = "SELECT t FROM TSpcode t WHERE t.spaddress = :spaddress"), @NamedQuery(name = "TSpcode.findBySptelphone", query = "SELECT t FROM TSpcode t WHERE t.sptelphone = :sptelphone"), @NamedQuery(name = "TSpcode.findBySplinkman", query = "SELECT t FROM TSpcode t WHERE t.splinkman = :splinkman"), @NamedQuery(name = "TSpcode.findBySpwebaddress", query = "SELECT t FROM TSpcode t WHERE t.spwebaddress = :spwebaddress")})
public class TSpcode implements Serializable {
    private static final long serialVersionUID = 1L;
    @Column(name = "id")
    private Integer id;
    @Id
    @Basic(optional = false)
    @Column(name = "spcode")
    private String spcode;
    @Column(name = "spname")
    private String spname;
    @Column(name = "spaddress")
    private String spaddress;
    @Column(name = "sptelphone")
    private String sptelphone;
    @Column(name = "splinkman")
    private String splinkman;
    @Column(name = "spwebaddress")
    private String spwebaddress;
    @Column(name = "sourceid")
    private String sourceid;
    @Column(name = "upspcode")
    private String upspcode;
    @Column(name = "level")
    private Integer level;
    @Column(name = "parentid")
    private Integer parentid;

    public TSpcode() {
    }

    public TSpcode(String spcode) {
        this.spcode = spcode;
    }

    public String getSpcode() {
        return spcode;
    }

    public void setSpcode(String spcode) {
        this.spcode = spcode;
    }

    public String getSpname() {
        return spname;
    }

    public void setSpname(String spname) {
        this.spname = spname;
    }

    public String getSpaddress() {
        return spaddress;
    }

    public void setSpaddress(String spaddress) {
        this.spaddress = spaddress;
    }

    public String getSptelphone() {
        return sptelphone;
    }

    public void setSptelphone(String sptelphone) {
        this.sptelphone = sptelphone;
    }

    public String getSplinkman() {
        return splinkman;
    }

    public void setSplinkman(String splinkman) {
        this.splinkman = splinkman;
    }

    public String getSpwebaddress() {
        return spwebaddress;
    }

    public void setSpwebaddress(String spwebaddress) {
        this.spwebaddress = spwebaddress;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (spcode != null ? spcode.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TSpcode)) {
            return false;
        }
        TSpcode other = (TSpcode) object;
        if ((this.spcode == null && other.spcode != null) || (this.spcode != null && !this.spcode.equals(other.spcode))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.TSpcode[spcode=" + spcode + "]";
    }

	/**
	 * id
	 *
	 * @return  the id
	 * @since   CodingExample Ver(编码范例查看) 1.0
	 */
	
	public Integer getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * level
	 *
	 * @return  the level
	 * @since   CodingExample Ver(编码范例查看) 1.0
	 */
	
	public Integer getLevel() {
		return level;
	}

	/**
	 * @param level the level to set
	 */
	public void setLevel(Integer level) {
		this.level = level;
	}

	/**
	 * parentid
	 *
	 * @return  the parentid
	 * @since   CodingExample Ver(编码范例查看) 1.0
	 */
	
	public Integer getParentid() {
		return parentid;
	}

	/**
	 * @param parentid the parentid to set
	 */
	public void setParentid(Integer parentid) {
		this.parentid = parentid;
	}

	/**
	 * sourceid
	 *
	 * @return  the sourceid
	 * @since   CodingExample Ver(编码范例查看) 1.0
	 */
	
	public String getSourceid() {
		return sourceid;
	}

	/**
	 * @param sourceid the sourceid to set
	 */
	public void setSourceid(String sourceid) {
		this.sourceid = sourceid;
	}

	/**
	 * upspcode
	 *
	 * @return  the upspcode
	 * @since   CodingExample Ver(编码范例查看) 1.0
	 */
	
	public String getUpspcode() {
		return upspcode;
	}

	/**
	 * @param upspcode the upspcode to set
	 */
	public void setUpspcode(String upspcode) {
		this.upspcode = upspcode;
	}

	
}
